package com.shop.controllers;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.google.gson.Gson;

@Controller
public class usersearchController {
	@ResponseBody
    @RequestMapping(value ="html/usersearch", produces = "application/json;charset=utf-8",method ={RequestMethod.GET})
	public String hello(String type){  
		
		String[][] back= {
				{"good1.jpg","18","报纸","店铺名"},
				{"good2.jpg","19","报纸","店铺名"},
				{"good3.jpg","22","报纸","店铺名"},
				{"good4.jpg","56","报纸","店铺名"},
				{"good5.jpg","111","报纸","店铺名"}
		};

        Gson gson =new Gson();
        String json =gson.toJson(back);
		return json;

    }
	
	  @RequestMapping(value ="html/hello2", produces = "application/json;charset=utf-8",method ={RequestMethod.GET})
		public String hello2(String age){  
			
			String[] back= {
					"111adidas nike lining","222adidas nike lining",
					"333adidas nike lining","444adidas nike lining"
			};

	        Gson gson =new Gson();
	        String json =gson.toJson(back);
			return json;
	    }
   
}

